﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CLEXA.DataContracts;
using CLEXA.ServiceContracts;

namespace CLEXA.SurfaceClient.Functions
{
    public class Login : ILogin
    {
        private readonly INavigator navigator;
        private readonly IClientService clientService;

        public Login(INavigator navigator, IClientService clientService)
        {
            this.navigator = navigator;
            this.clientService = clientService;
        }

        int ILogin.Login(string username, string password)
        {
            return clientService.Login(username, password);
        }

        void ILogin.GoToHome(UserData user)
        {
            navigator.GoToHome(user);
        }
    }
}
